package com.pivotal.cloud.security.jwt;

import com.pivotal.cloud.crypto.codec.Codecs;

/**
 * @className: com.pivotal.cloud.security.jwt.JwtHeader
 * @projectName: PivotalCloud项目
 * @module: PivotalCloud项目-JwtHeader类，主要位于Security安全模块-Jwt请求头模块
 * @content: JwtHeader-Jwt请求头
 * @author: Powered by Marklin
 * @datetime: 2025-06-21 20:26
 * @version: 1.0.0
 * @copyright: Copyright © 2018-2025 PivotalCloud Systems Incorporated. All rights
 * reserved.
 */
public class JwtHeader implements BinaryFormat {

	private final byte[] bytes;

	final HeaderParameters parameters;

	JwtHeader(byte[] bytes, HeaderParameters parameters) {
		this.bytes = bytes;
		this.parameters = parameters;
	}

	@Override
	public byte[] bytes() {
		return this.bytes;
	}

	@Override
	public String toString() {
		return Codecs.utf8Decode(this.bytes);
	}

}
